package com.design.graduation.asdemo.view;

import android.content.Context;
import android.util.AttributeSet;
import android.widget.ListView;

/**
 * Created by liyugang on 7/3/15.
 */
public class ListViewForScrollView extends ListView {

    public ListViewForScrollView(final Context context) {
        super(context);
    }

    public ListViewForScrollView(final Context context,
                                 final AttributeSet attrs, final int defStyle) {
        super(context, attrs, defStyle);
    }

    public ListViewForScrollView(final Context context, final AttributeSet attrs) {
        super(context, attrs);
    }

    @Override
    protected void onMeasure(final int widthMeasureSpec,
                             final int heightMeasureSpec) {
        final int expandSpec = MeasureSpec.makeMeasureSpec(
                Integer.MAX_VALUE >> 2, MeasureSpec.AT_MOST);
        super.onMeasure(widthMeasureSpec, expandSpec);
    }
}
